﻿* Encoding: UTF-8.
*************************
Tables 1 and 2 Variable recodes
*************************

FILTER OFF.
USE ALL.
SELECT IF (CONDITION = 1).
EXECUTE.

recode Post7(1=-1)(2=1)(else=0) into votechoicepost.
recode Pre97 (2=1) (1=0) into gender1.
execute. 

compute anger=(angerTimePercent+@2angerTimePercent +@3angerTimePercent+@4angerTimePercent+@5angerTimePercent
  + @6angerTimePercent+@7angerTimePercent+@8angerTimePercent)/8.
compute fear=(fearTimePercent+@2fearTimePercent +@3fearTimePercent+@4fearTimePercent+@5fearTimePercent
  + @6fearTimePercent+@7fearTimePercent+@8fearTimePercent)/8.
compute contempt=(contemptTimePercent+@2contemptTimePercent +@3contemptTimePercent+@4contemptTimePercent+@5contemptTimePercent
  + @6contemptTimePercent+@7contemptTimePercent+@8contemptTimePercent)/8.
compute disgust=(disgustTimePercent+@2disgustTimePercent +@3disgustTimePercent+@4disgustTimePercent+@5disgustTimePercent
  + @6disgustTimePercent+@7disgustTimePercent+@8disgustTimePercent)/8.
compute sadness=(sadnessTimePercent+@2sadnessTimePercent +@3sadnessTimePercent+@4sadnessTimePercent+@5sadnessTimePercent
  + @6sadnessTimePercent+@7sadnessTimePercent+@8sadnessTimePercent)/8.
execute.

recode sadness (SYSMIS=0) (ELSE=1) into NoEmotion.
execute. 

FILTER OFF.
USE ALL.
SELECT IF (NoEmotion = 1).
EXECUTE.

*****************************
Table 1 syntax
****************************

ONEWAY sadness fear anger disgust contempt BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.



*****************************
Table 2 syntax
****************************

ONEWAY 
  sadnessTimePercent  @2sadnessTimePercent @3sadnessTimePercent  @4sadnessTimePercent  @5sadnessTimePercent 
  @6sadnessTimePercent @7sadnessTimePercent @8sadnessTimePercent 
  BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.


ONEWAY 
  FearTimePercent  @2FearTimePercent @3FearTimePercent  @4FearTimePercent  @5FearTimePercent 
  @6FearTimePercent @7FearTimePercent @8FearTimePercent 
  BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.


ONEWAY 
  AngerTimePercent  @2AngerTimePercent @3AngerTimePercent  @4AngerTimePercent  @5AngerTimePercent 
  @6AngerTimePercent @7AngerTimePercent @8AngerTimePercent 
  BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.


ONEWAY 
  DisgustTimePercent  @2DisgustTimePercent @3DisgustTimePercent  @4DisgustTimePercent  @5DisgustTimePercent 
  @6DisgustTimePercent @7DisgustTimePercent @8DisgustTimePercent 
  BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.

ONEWAY 
  ContemptTimePercent  @2ContemptTimePercent @3ContemptTimePercent  @4ContemptTimePercent  @5ContemptTimePercent 
  @6ContemptTimePercent @7ContemptTimePercent @8ContemptTimePercent 
  BY gender1
  /STATISTICS DESCRIPTIVES 
  /MISSING ANALYSIS.



***************************
Tables 3 & 4 Variable recodes
**************************

recode Pre102 (2=1) (ELSE=0) into white.
execute. 
recode Pre4(1=1)(2=2)(3=3)(4=4)(5=5)(6=6)(7=7)(else=SYSMIS) into partyid.
execute. 

FILTER OFF.
USE ALL.
SELECT IF  (NOT(partyid=0)).
EXECUTE.

AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=
  /disgust_mean=MEAN(disgust) 
  /sadness_mean=MEAN(sadness) 
  /contempt_mean=MEAN(contempt).

AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=
  /fear_mean=MEAN(fear) 
  /anger_mean=MEAN(anger) 
  /partyid_mean=MEAN(partyid) .


COMPUTE DisgustDeviation=disgust_mean - disgust.
EXECUTE.
COMPUTE SadnessDeviation=sadness_mean - sadness.
EXECUTE.
COMPUTE fearDeviation=fear_mean - fear.
COMPUTE angerDeviation=anger_mean - anger.
EXECUTE.
COMPUTE contemptDeviation=contempt_mean - contempt.

compute angerdeviationx=(angerdeviation*gender1).
compute contemptdeviationx=(contemptdeviation*gender1).
compute disgustdeviationx=(disgustdeviation*gender1).
compute sadnessdeviationx=(sadnessdeviation*gender1).
compute feardeviationx=(feardeviation*gender1).


COMPUTE partyidcenter=partyid_mean-partyid.
EXECUTE.



*****************************
Table 3 syntax
*****************************


REGRESSION
  /DESCRIPTIVES MEAN STDDEV CORR SIG N
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN TOL CHANGE ZPP
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT  Post2
  /METHOD=ENTER   AngerDeviation ContemptDeviation DisgustDeviation fearDeviation SadnessDeviation angerdeviationx contemptdeviationx disgustdeviationx  feardeviationx gender1 white partyidcenter
  /RESIDUALS DURBIN.

 
REGRESSION
  /DESCRIPTIVES MEAN STDDEV CORR SIG N
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN TOL CHANGE ZPP
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT  Post3
  /METHOD=ENTER   AngerDeviation ContemptDeviation DisgustDeviation fearDeviation SadnessDeviation angerdeviationx contemptdeviationx disgustdeviationx  feardeviationx gender1 white partyidcenter
  /RESIDUALS DURBIN.


*****************************
Table 4 syntax
*****************************


REGRESSION
  /DESCRIPTIVES MEAN STDDEV CORR SIG N
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN TOL CHANGE ZPP
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Post10
  /METHOD=ENTER  Pre13 AngerDeviation ContemptDeviation DisgustDeviation fearDeviation SadnessDeviation angerdeviationx contemptdeviationx disgustdeviationx  feardeviationx gender1 white partyidcenter
  /RESIDUALS DURBIN.


REGRESSION
  /DESCRIPTIVES MEAN STDDEV CORR SIG N
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN TOL CHANGE ZPP
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT Post9
  /METHOD=ENTER  Pre12 AngerDeviation ContemptDeviation DisgustDeviation  fearDeviation  SadnessDeviation  angerdeviationx contemptdeviationx disgustdeviationx feardeviationx gender1 white partyidcenter
  /RESIDUALS DURBIN.


**********************************
Vote Choice Models
**********************************


PLUM votechoicepost   BY  gender1 white WITH    post9 post10   partyidcenter 
  /CRITERIA=CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5) PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /LINK=LOGIT
  /PRINT=FIT PARAMETER SUMMARY.


PLUM votechoicepost   BY  gender1 white WITH    
    partyidcenter AngerDeviation ContemptDeviation DisgustDeviation  fearDeviation  SadnessDeviation  angerdeviationx contemptdeviationx disgustdeviationx feardeviationx   
  /CRITERIA=CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5) PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /LINK=LOGIT
  /PRINT=FIT PARAMETER SUMMARY.



  


